package cn.dzhang.mybatis.model;

import java.io.Serializable;
import java.text.MessageFormat;

public class User implements Serializable
{
	private static final long serialVersionUID = 6410121657833924869L;
	private Integer id;
	private String name;
	private String password;
	private String username;
	private boolean expired;
	private boolean online;

	public Integer getId()
	{
		return id;
	}

	public void setId(Integer id)
	{
		this.id = id;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getPassword()
	{
		return password;
	}

	public void setPassword(String password)
	{
		this.password = password;
	}

	public String getUsername()
	{
		return username;
	}

	public void setUsername(String username)
	{
		this.username = username;
	}

	public boolean isExpired()
	{
		return expired;
	}

	public void setExpired(boolean expired)
	{
		this.expired = expired;
	}

	public boolean isOnline()
	{
		return online;
	}

	public void setOnline(boolean online)
	{
		this.online = online;
	}

	@Override
	public String toString()
	{
		return MessageFormat
		        .format("User [id={0}, name={1}, password={2}, username={3}, expired={4}, online={5}]",
		                id, name, password, username, expired, online);
	}

}